<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // 字符串
      //includes()
      var str = "Hello world, welcome to the Runoob。";
      var n = str.includes("Runoob");
      console.log(n);
      //startsWith()和endsWith()
      var s = str.startsWith("H");
      console.log(s);
      //repeat()
      var str = "Runoob";
      str.repeat(2);
      // 数值
      // Number.isFinite()  ES5方法isFinite()
      console.log(Number.isFinite(25));
      console.log(Number.isFinite(Infinity));
      console.log(isFinite("100"));
      console.log(Number.isFinite("100")); //不会进行隐式转换
      // Number.isNaN()   isNaN()
      console.log(Number.isNaN("20"));
      console.log(isNaN("20"));
      //数组
      // Array.from()
      function show() {
        Array.from(arguments).map(function (val) {
          console.log(val);
        });
      }
      show(1, 2, 3, 4, 5);
    </script>
  </body>
</html>
